<script language="javascript">

$(function(){
		   
	$('#formLogin').ajaxForm({
		dataType: 'json',
		beforeSubmit: function() {
			if( $("#formLogin").validate().form()==false )
			return false;
		},
		success: function(responseText, statusText) {
			if(responseText.sucesso){				
				$.jAlert(responseText.mensagem, '', function(result) {
					document.formLogin.reset();
					window.location = "/?pg=home";												  
                });			
			}else{
				$.jAlert(responseText.mensagem, '', function(result) {});
			}
		}
	})
			
	$("#txtUser").focus();
	
})
</script>

</head>
<body>
<form class="formLogin" action="actions/loginAction.php" method="post" id="formLogin" name="formLogin">    
        <table width="300" border="0" cellspacing="0">
          <tr>
            <td height="52" style="color:#1c94c4;"><b>Usu&aacute;rio:<b/></td>
            <td><input type="text" id="txtUser" name="txtUser" class="required"/><br/><a href="?pg=alunoEscola"> Ainda n&atilde;o tenho cadastro </a></td>
          </tr>
          <tr>
            <td height="52"style="color:#1c94c4;"><b>Senha:<b/></td>
            <td><input type="password" id="txtPass" name="txtPass" class="required"/><br/><a href="#"> Esqueci a minha senha </a></td>
          </tr>
          <tr>
            <td>&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr>
            <td colspan="2" align="center">
                <input type="submit" id="btnEntrar" value="Entrar" class="required" />
            </td>
          </tr>
    </table>				
	</form>

</body>
</html>